package com.situ.car.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.situ.car.dao.IUserDao;
import com.situ.car.dao.Impl.UserDaoImpl;
import com.situ.car.pojo.entity.UserData;

public class UserExcelListener extends AnalysisEventListener<UserData> {
    private IUserDao userDao = new UserDaoImpl();

    @Override
    public void invoke(UserData userData, AnalysisContext analysisContext) {
        System.out.println("UserExcelListener.invoke");
        System.out.println(userData);
        userDao.addExcel(userData);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("UserExcelListener.doAfterAllAnalysed");
    }
}